package com.chris.homecare.utils
{
	import pl.mateuszmackowiak.nativeANE.dialogs.NativeAlertDialog;
	import pl.mateuszmackowiak.nativeANE.events.NativeDialogEvent;
	
	public class ShowNativeAlert
	{
		private static var singletonInstance:ShowNativeAlert;
		
		public static function getSingletonInstance():ShowNativeAlert
		{
			if(!singletonInstance) singletonInstance = new ShowNativeAlert();
			
			return singletonInstance;
		}
		
		public static function showAlertAndGetResponse(alertObject:Object, responseFunction:Function):void
		{
			NativeAlertDialog.showAlert(alertObject.message, alertObject.title, alertObject.buttons, responseFunction,true, NativeAlertDialog.ANDROID_DEVICE_DEFAULT_LIGHT_THEME);
		}
		
		public static function showAlert(alertObject:Object):void
		{
			NativeAlertDialog.showAlert(alertObject.message, alertObject.title, alertObject.buttons, null, true, NativeAlertDialog.ANDROID_DEVICE_DEFAULT_LIGHT_THEME);
		}
		
		protected function alertResponse(event:NativeDialogEvent):void
		{
			trace("alertResponse");
		}
	}
}